import {PageContainer, ProTable} from "@ant-design/pro-components";
import React from "react";
import {ProColumns} from "@ant-design/pro-components";

const Index: React.FC = () => {

  const columns: ProColumns<Record<string, any>, "text">[] = [
    {
      title: '名称',
      dataIndex: 'name'
    },
    {
      title: 'Artifacts',
      dataIndex: 'artifacts',
      hideInSearch: true,
    },
    {
      title: '下载数',
      dataIndex: 'downloads',
      hideInSearch: true,
    },
    {
      title: '最新变更时间',
      dataIndex: 'uptime',
      hideInSearch: true,
    },
  ]

  const dataSource = [
    {
      key: '1',
      name: 'test/stable/plm/plm-sup',
      artifacts: '100',
      downloads: '1000',
      uptime: '2022-01-01 12:00:00',
    },
    {
      key: '2',
      name: 'test/stable/order-link/order-link-serivce',
      artifacts: '200',
      downloads: '2000',
      uptime: '2022-01-01 12:00:00',
    }
  ]


  return (
    <PageContainer title={false}>
      <div style={{height: '100vh'}}>
        <ProTable
          rowKey="key"
          // rowSelection={{}}
          columns={columns}
          toolbar={
            {title: '镜像列表'}
          }
          dataSource={dataSource}
        />
      </div>
    </PageContainer>
  )
}

export default Index;
